﻿using System;
using System.Collections.Generic;

namespace MGAS.Logic.Communication
{
    class SensorData : ISensorData
    {
        public SensorData(byte address)
        {
            _address = address;
        }

        public SensorData(byte address, int building, int floor, int line, GasType gasType)
        {
            _address = address;
            _exist = true;

            _building = building;
            _floor = floor;
            _line = line;
            _gasType = gasType;
        }

        private byte _address;
        public byte Address
        {
            get { return _address; }
        }

        public int Value { get; set; }
        public virtual PressureStatus Status { get; set; }
        public virtual PressureUnit Unit { get; set; }

        private bool _exist;
        public bool Exist
        {
            get { return _exist; }
        }

        private int _building;
        public int Building
        {
            get { return _building; }
        }

        private int _floor;
        public int Floor
        {
            get { return _floor; }
        }

        private int _line;
        public int Line
        {
            get { return _line; }
        }

        private GasType _gasType;
        public GasType GasType
        {
            get { return _gasType; }
        }
    }
}
